import 'dart:convert';

import 'package:ichinesereader/models/report/studentOverview.dart';

ClassOverviewDetailsResult classOverviewDetailsResultFromJson(String str) =>
    ClassOverviewDetailsResult.fromJson(json.decode(str));

String classOverviewDetailsResultToJson(ClassOverviewDetailsResult data) =>
    json.encode(data.toJson());

class ClassOverviewDetailsResult {
  ClassOverviewDetailsResult({
    this.status,
    this.message,
    this.result,
  });

  int? status;
  String? message;
  Result? result;

  factory ClassOverviewDetailsResult.fromJson(Map<String, dynamic> json) =>
      ClassOverviewDetailsResult(
        status: json["status"],
        message: json["message"],
        result: Result.fromJson(json["result"]),
      );

  Map<String, dynamic> toJson() => {
        "status": status,
        "message": message,
        "result": result != null ? result?.toJson() : null,
      };
}

class Result {
  Result({
    this.dataList,
  });

  List<StudentOverview>? dataList;

  factory Result.fromJson(Map<String, dynamic> json) => Result(
        dataList: json["dataList"] != null
            ? List<StudentOverview>.from(
                json["dataList"].map((x) => StudentOverview.fromJson(x)))
            : null,
      );

  Map<String, dynamic> toJson() => {
        "dataList": dataList != null
            ? List<dynamic>.from(dataList!.map((x) => x.toJson()))
            : null,
      };
}
